import Layout from "../views/layout/Layout";

const _import = require("./_import_" + process.env.NODE_ENV);
const AppComponent = {
  template: "<router-view/>"
};
export default {
  path: "/bizhibo",
  component: Layout,
  meta: { title: "碧选直播管理后台", icon: "icon" },
  children: [
    {
      path: "monitor",
      component: _import("bizhibo/monitor/manage"),
      name: "bzb-monitor",
      meta: {
        title: "碧选直播监控",
        buttons: {
          data: { label: '直播数据', enabled: true },
          add: { label: '添加人气', enabled: true },
          detail: { label: '商品详情', enabled: true },
          disable: { label: '禁用', enabled: true },
          end: { label: '结束直播', enabled: true },
          reason: { label: '下线原因', enabled: true }
        }
      }
    },
    {
      path: "/bizhibo-anchor",
      component: AppComponent,
      name: "anchor",
      redirect: "/bizhibo-anchor/list",
      meta: { title: "主播管理" },
      children: [
        {
          path: "list",
          name: "bzb-anchorlist",
          component: _import("bizhibo/anchor/list"),
          meta: {
            title: "主播列表",
            buttons: {
              setStar: { label: '设置明星主播', enabled: true },
              operate: { label: '冻结/恢复', enabled: true },
              set: { label: '设置', enabled: true }
            }
          }
        },
        {
          path: "manage",
          name: "bzb-anchormanage",
          component: _import("bizhibo/anchor/manage"),
          meta: {
            title: "主播审核",
            buttons: {
              operate: { label: '审核', enabled: true },
              reason: { label: '查看拒绝原因', enabled: true }
            }
          }
        },
        {
          path: "whitelist",
          name: "bzb-whitelist",
          component: _import("bizhibo/anchor/whitelist"),
          meta: {
            title: "主播白名单",
            buttons: {
              delete: { label: '删除', enabled: true },
              add: { label: '添加白名单', enabled: true }
            }
          }
        }
      ]
    },
    {
      path: "/livemanage",
      component: AppComponent,
      name: "livemanage",
      meta: { title: "直播管理" },
      children: [
        {
          path: "livelist",
          name: "bzb-livelist",
          component: _import("bizhibo/live/manage"),
          meta: {
            title: '直播管理',
            buttons: {
              operate: { label: '审核', enabled: true },
              refuseReason: { label: '查看拒绝原因', enabled: true },
              detail: { label: '查看直播间详情', enabled: true },
              report: { label: '查看报表', enabled: true },
              end: { label: '关闭直播间', enabled: true },
              endReason: { label: '查看关闭原因', enabled: true },
              delete: { label: '删除', enabled: true },
              setShowStatus: { label: '设为隐藏/显示直播间', enabled: true },
              lookResult: { label: '抽奖结果', enabled: true }
            }
          }
        },
        {
          path: "reportlist",
          name: "bzb-reportlist",
          component: _import("bizhibo/live/report/index"),
          meta: {
            title: "举报列表管理",
            buttons: {
              operate: { label: '已撤销/已关闭', enabled: true },
              set: { label: '处理', enabled: true }
            }
          }
        },
        {
          path: "userreportlist",
          name: "bzb-userreportlist",
          component: _import("bizhibo/live/userReport"),
          meta: {
            title: "用户举报管理",
            buttons: {
              operate: { label: '禁言/取消禁言', enabled: true },
              detail: { label: '明细', enabled: true }
            }
          }
        }
      ]
    },
    {
      path: "liveluck/:id",
      component: _import("bizhibo/live/liveluck"),
      name: "liveluck",
      meta: {
        title: "抽奖结果",
        buttons: {
          lookResult: { label: '抽奖结果', enabled: true }
        }
      },
      hidden: true
    },
    {
      path: "/systemset",
      component: AppComponent,
      name: "systemset",
      redirect: "systemset/help",
      meta: { title: "系统参数设置" },
      children: [
        {
          path: "help",
          component: _import("bizhibo/systemset/help/index"),
          name: "help",
          meta: {
            title: "帮助中心",
            buttons: {
              edit: { label: '编辑', enabled: true }
            }
          }
        }
      ]
    },
    {
      path: "systemset",
      component: _import("bizhibo/systemset/params/manage"),
      name: "systemset",
      meta: {
        title: "系统参数设置",
        roles: [1, 2, 3, 4, 5, 6, 7, 8]
      }
    }
  ]
};
